import request from '../../views/components/utils/request.js'

// 查询评价规则列表
export function listRubric(query) {
  return request({
    url: '/system/rubric/list',
    method: 'get',
    params: query
  })
}

// 查询评价规则详细
export function getRubric(ruleId) {
  return request({
    url: '/system/rubric/' + ruleId,
    method: 'get'
  })
}

// 新增评价规则
export function addRubric(data) {
  return request({
    url: '/system/rubric',
    method: 'post',
    data: data
  })
}

// 修改评价规则
export function updateRubric(data) {
  return request({
    url: '/system/rubric',
    method: 'put',
    data: data
  })
}

// 删除评价规则
export function delRubric(ruleId) {
  return request({
    url: '/system/rubric/' + ruleId,
    method: 'delete'
  })
}

// 导出评价规则
export function exportRubric(query) {
  return request({
    url: '/system/rubric/export',
    method: 'get',
    params: query
  })
}
